﻿#region Librerias

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;

#endregion 


namespace ESF.GTK
{
	public static class GTKConverter
	{
		public static Gdk.Pixbuf ImageToPixbuf(Bitmap image)
		{
			using (MemoryStream stream = new MemoryStream())
			{
				image.Save(stream, ImageFormat.Png);
				stream.Position = 0;

				return new Gdk.Pixbuf(stream);
			}
		}
	}
}
